#include "mu.h"

#include <iostream>

#include "lexer.h"
#include "token.h"
#include "utils.h"

using namespace std;

int main(int argc, char **argv) {
  if (argc < 2) {
    printf("usage: %s 文件名.mu\n", argv[0]);
    return -1;
  }

  Lexer lexer;

  lexer.set_code(read_txt(argv[1]));
  while (true) {
    Token token = lexer.next();
    if (token.kind == EOL)break;
    cout << token.print() << endl;
  }

  return 0;
}